1. Field of the Invention
This invention relates to timing alignment. More particularly, the invention relates to a system and method for improving alignment of a clock signal to a data signal.
2. Description of the Related Art
Switching elements that transfer data in a computing system take an amount of time to switch between a signal ‘0’ and a signal ‘1’, and vice-versa. Since switching elements change voltage levels when changing logic states, all elements have some sort of “timing uncertainty” attributed to ramping the voltage, a jitter from power supply noise, switching, and other sources. As the transfer speed of data increases, the timing uncertainty causes less time to exist where the data transferred can be read successfully on an edge of a clock signal. Hence, alignment of the clock signal for a data line is important to ensure that data may still be read.
To align a clock signal to a data signal, the position of the clock signal in relation to the data signal is “trained.” The position is trained by placing a signal on the source for a data signal (e.g., one end of a BUS line), moving the position of the clock signal related to the data signal, and reading the signal on the destination of the data signal (e.g., the other end of the BUS line). The data is checked and the clock signal moved until the system determines no errors exist in reading the data.
One data pattern used to train the alignment of the clock signal is a “clock pattern” (i.e., 1-0-1-0). The data pattern is short and allows the training time to be minimized. One problem with use of the clock pattern is that the clock pattern is not a thorough trainer in aligning the clock signal, due to the absence of electrical impairments such as crosstalk and ISI, and therefore more errors than wanted may occur in reading the data signal.
Another data pattern used to train the alignment of the clock signal is a random data pattern. Training with a random data pattern instead of a clock pattern is better able to find the optimal position for the clock signal. One problem with use of the random data pattern is that the random data pattern is longer than the clock pattern (e.g., 256 bits compared to 16 bits). Therefore, training with the random data pattern takes a significantly longer time than training with the clock pattern.
While a system is in use, the position of the clock signal in relation to the data signal will shift over time. The position may move due to temperature, voltage, or other changes in the system. As a result, the system should periodically retrain the clock signal during the system's operation. The interval at which the clock signal should retrain is dependent on how quickly the clock position may move due to these changes. Because the clock signal is retrained while the system is in operation, retraining time should be kept to a minimum.
Therefore, what is needed is an improved system and method for training the alignment of a clock signal to a data signal that is fast like the “clock pattern” training but accurate like the “random data pattern” training.